import request from '@/utils/request'

const tenantUrl = '/sysTenant/v1';



//租户相关api
export function tenantSave(data) {
    return request({
        url: `${tenantUrl}/save`,
        method: 'POST',
        data
    });
}

export function tenantDel(id) {
    return request({
        url: `${tenantUrl}/del/${id}`,
        method: 'POST',
    });
}

export function tenantSearch(data) {
    return request({
        url: `${tenantUrl}/list`,
        method: 'GET',
        params: data
    });
}

export function tenantTree() {
    return request({
        url: `${tenantUrl}/tree`,
        method: 'GET',
    });
}

export function roleTenantPage(data) {
    return request({
        url: `${tenantUrl}/role/list`,
        method: 'GET',
        params: data
    });
}

// 保存修改角色
export function roleTenantSave(data) {
    return request({
        url: `${tenantUrl}/role/save`,
        method: 'POST',
        data
    });
}

//删除角色
export function roleTenantDel(id) {
    return request({
        url: `${tenantUrl}/role/del/${id}`,
        method: 'POST',
    });
}






